hello Guys , welcome to our website Quick Tech Expert in this article i tells about not only concept of First C Program Hello World but i will tells about language c basics, So guys if you like my article Please give feedback for Our Website by feedback corner below , And If Any Queries Please Comment On My Article By Which I Can Satisfy You .
First C Program Hello World
Guys , C Programming Language Is That Most of Popular Programming Language Because Most of The
Popular Operating Systems like as android , windows , linux , etc are Written in C Language ,
so We Also Learn about the concept Of first c program (Hello World) and also learn about
language c basics in this article we write a first c program hello world but
before writting first c program hello world we must also learn about concept of language
c basics so first of all we learn about language c basics .
Note : C Programming language is case sensitive language it means capital letter is capital and small letter is small also .
language c basics :
we can formally access the c program but only writting c program does not give correct output that we wants so we have must know about language c basics so the here is the , basic of c programming not also but all programming languages.which are :
- documentation block
- header section
- global section
- main section
- input , output and processing
- UDF user defined function
Now We understand only language c basics:
Header | # include < stdio.h > |
main() | int main(){ |
variable declaration | int a ; |
body | printf("%d",a); |
return | return 0 ;} |
Prepocessor :
Prepocessor is also a software or program that process the source file before sending it to actual compilation . Prepocessor has ability to include header files in program . it is represented by #
Header Files :
header files are those files which stores the definitions of the functions . Header files are included in the program with the use of Prepocessor in C language .
functions in c :
functions is also a part of a program which is used to performs a specific tasks . there are two type of functions which are predefined function user defined function pre defined functions are that functions which are already defined in c language ex printf(), scanf() etc and that functions which are defined or implemented by user is called userdefined function also . ex main() . Note : To Determine That is function you see two brackets with the function word .
<>angle brackets :
angle brackets says the compiler that function of header file included by library .
Data Type :
data type is also used for function it determines the size and type of data allocated in the memory . ex void , int , etc
stdio.h :
stdio.h stands for Standard Input Output Header File . In This Header File Some Standard Functions Are Stored , For Using Input And Output Framework We use This Header Files .
Note : IF WE NOT USE THIS HEADER FILE IN OUR C PROGRAM THEN IT GIVES SOME PROTOTYPE ERRORS .
printf() :
printf() Is Also A Output Function Which Is Used For Display The Message On The Output Screen .
Rules For writting A C Program :
C Program indicates how is it to be written it means though a free form language , there is a certain rules about c program which is applicable to all c programs
- each instructions in c program language is written in seperate statements .
- the statements must be appear in the same order in which we can get our desired output .
- all satements should be case sensitive .
- blank spaces may be inserted for understanding points clearly .
- Every c statements must end with a semicolon (;) this acts as terminator in english language as full stop .
- usually each line contains only one statements , by which we can write multiple statements in one line using terminator .
compilation And Execution :
once you have written the program , you need to type it and instruct it to machine to execute it , Two other programs are needed to do this that are editor and compiler Editors gives us facility to type our program also and whereas compiler converts our program into equivalent machine language program . this is the necessary condition to take desired output for the given written program .
C Program Hello World !
Program :
# include < stdio.h >
int main()
{
printf(" Hello World ! ");
return 0 ;
}
Output :
Hello World !
0 Comments